import Vue from 'vue'
import Vuex from 'vuex'
import app from './modules/app'

import VuexPersistence from 'vuex-persist'

Vue.use(Vuex)

const vuexLocalStore = new VuexPersistence({
    key: 'vuex-data',
    storage: window.localStorage,
    modules: ['app']

});

export default new Vuex.Store({
    modules: {
        app,
    },
    plugins: [vuexLocalStore.plugin]
});
